package com.qs.auto.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the auto_vehicle_body_mst database table.
 * 
 */
@Entity
@Table(name="auto_vehicle_body_mst")
public class AutoVehicleBodyMst implements Serializable {
	private static final long serialVersionUID = 1L;
	private String vehicleBodyId;
	private Date activeDateFrom;
	private String body;
	private String createdBy;
	private Date createdDt;
	private byte[] image;
	private String updatedBy;
	private Date updatedDt;
	private AutoVehicleModelMst autoVehicleModelMst;
	private List<AutoVehicleDetail> autoVehicleDetails;

    public AutoVehicleBodyMst() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="VEHICLE_BODY_ID")
	public String getVehicleBodyId() {
		return this.vehicleBodyId;
	}

	public void setVehicleBodyId(String vehicleBodyId) {
		this.vehicleBodyId = vehicleBodyId;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="ACTIVE_DATE_FROM")
	public Date getActiveDateFrom() {
		return this.activeDateFrom;
	}

	public void setActiveDateFrom(Date activeDateFrom) {
		this.activeDateFrom = activeDateFrom;
	}


	@Column(name="BODY")
	public String getBody() {
		return this.body;
	}

	public void setBody(String body) {
		this.body = body;
	}


	@Column(name="CREATED_BY")
	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="CREATED_DT")
	public Date getCreatedDt() {
		return this.createdDt;
	}

	public void setCreatedDt(Date createdDt) {
		this.createdDt = createdDt;
	}


    @Lob()
	@Column(name="IMAGE")
	public byte[] getImage() {
		return this.image;
	}

	public void setImage(byte[] image) {
		this.image = image;
	}


	@Column(name="UPDATED_BY")
	public String getUpdatedBy() {
		return this.updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {
		this.updatedBy = updatedBy;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="UPDATED_DT")
	public Date getUpdatedDt() {
		return this.updatedDt;
	}

	public void setUpdatedDt(Date updatedDt) {
		this.updatedDt = updatedDt;
	}


	//bi-directional many-to-one association to AutoVehicleModelMst
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="VEHICLE_MODEL_ID")
	public AutoVehicleModelMst getAutoVehicleModelMst() {
		return this.autoVehicleModelMst;
	}

	public void setAutoVehicleModelMst(AutoVehicleModelMst autoVehicleModelMst) {
		this.autoVehicleModelMst = autoVehicleModelMst;
	}
	

	//bi-directional many-to-one association to AutoVehicleDetail
	@OneToMany(mappedBy="autoVehicleBodyMst")
	public List<AutoVehicleDetail> getAutoVehicleDetails() {
		return this.autoVehicleDetails;
	}

	public void setAutoVehicleDetails(List<AutoVehicleDetail> autoVehicleDetails) {
		this.autoVehicleDetails = autoVehicleDetails;
	}
	
}